﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var authtypeData = Jxstar.findComboData('authtype');
	var moneytypeData = Jxstar.findComboData('moneytype');
	var purtypeData = Jxstar.findComboData('purtype');
	var httypeData = Jxstar.findComboData('httype');

	var cols = [
	{col:{header:'记录状态', width:83, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'contract_say__auditing',type:'string'}},
	{col:{header:'合同名称', width:100, sortable:true}, field:{name:'contract_say__contract_name',type:'string'}},
	{col:{header:'项目编号', width:100, sortable:true}, field:{name:'contract_say__project_code',type:'string'}},
	{col:{header:'项目名称', width:202, sortable:true}, field:{name:'contract_say__project_name',type:'string'}},
	{col:{header:'授权形式', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: authtypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: authtypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < authtypeData.length; i++) {
				if (authtypeData[i][0] == value)
					return authtypeData[i][1];
			}
		}}, field:{name:'contract_say__auth_type',type:'string'}},
	{col:{header:'项目概算(万元)', width:100, sortable:true, renderer:JxUtil.formatNumber(6)}, field:{name:'contract_say__project_money',type:'float'}},
	{col:{header:'实施单位', width:115, sortable:true}, field:{name:'contract_say__dept_name',type:'string'}},
	{col:{header:'项目负责人', width:84, sortable:true}, field:{name:'contract_say__project_user',type:'string'}},
	{col:{header:'合同签订部门', width:127, sortable:true}, field:{name:'contract_say__done_deptname',type:'string'}},
	{col:{header:'对方签约单位', width:162, sortable:true}, field:{name:'contract_say__provider_name',type:'string'}},
	{col:{header:'谈判单号', width:100, sortable:true}, field:{name:'contract_say__say_code',type:'string'}},
	{col:{header:'公司参加谈判人员', width:100, sortable:true, hidden:true}, field:{name:'contract_say__sayperson_gs',type:'string'}},
	{col:{header:'对方参加谈判人员', width:100, sortable:true, hidden:true}, field:{name:'contract_say__sayperson_dw',type:'string'}},
	{col:{header:'谈判时间', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'contract_say__say_date',type:'date'}},
	{col:{header:'谈判地点', width:100, sortable:true}, field:{name:'contract_say__say_address',type:'string'}},
	{col:{header:'谈判情况记录', width:100, sortable:true, hidden:true}, field:{name:'contract_say__say_content',type:'string'}},
	{col:{header:'谈判结论', width:210, sortable:true}, field:{name:'contract_say__say_result',type:'string'}},
	{col:{header:'谈判人员是否签名', width:100, sortable:true, hidden:true}, field:{name:'contract_say__is_qm',type:'string'}},
	{col:{header:'备注', width:100, sortable:true, hidden:true}, field:{name:'contract_say__comments',type:'string'}},
	{col:{header:'实施单位ID', width:100, sortable:true, hidden:true}, field:{name:'contract_say__dept_id',type:'string'}},
	{col:{header:'项目ID', width:100, sortable:true, hidden:true}, field:{name:'contract_say__project_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'contract_say__say_id',type:'string'}},
	{col:{header:'项目负责人ID', width:100, sortable:true, hidden:true}, field:{name:'contract_say__project_userid',type:'string'}},
	{col:{header:'项目类别', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: moneytypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: moneytypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < moneytypeData.length; i++) {
				if (moneytypeData[i][0] == value)
					return moneytypeData[i][1];
			}
		}}, field:{name:'contract_say__money_type',type:'string'}},
	{col:{header:'合同签订部门ID', width:100, sortable:true, hidden:true}, field:{name:'contract_say__done_deptid',type:'string'}},
	{col:{header:'谈判结果金额(万元)', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(6)}, field:{name:'contract_say__bid_money',type:'float'}},
	{col:{header:'采购方式', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: purtypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: purtypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < purtypeData.length; i++) {
				if (purtypeData[i][0] == value)
					return purtypeData[i][1];
			}
		}}, field:{name:'contract_say__pur_type',type:'string'}},
	{col:{header:'合同类型', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: httypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: httypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < httypeData.length; i++) {
				if (httypeData[i][0] == value)
					return httypeData[i][1];
			}
		}}, field:{name:'contract_say__contract_type',type:'string'}},
	{col:{header:'谈判记录表', width:100, sortable:true, hidden:true}, field:{name:'contract_say__say_file',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '0',
		isshow: '1',
		funid: 'contract_say'
	};
	
	
	
		
	return new Jxstar.GridNode(config);
}